package java8.test.exercise;

//线程的实例化
public class Learning05{

    /**
     * 需求：开辟一条线程，做一个数字的输出
     */
    public static void test01(){
        Thread t = new Thread(() -> {

            System.out.println("t");

        });
        t.start();

       Runnable t2 = new Runnable() {
           @Override
           public void run() {
               System.out.println("t2");
           }
       };
       t2.run();
    }

    public static void main(String[] args) {
        test01();
    }

}
